package com.xs.aifitnessagent.entities.req;

import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.Pattern;
import lombok.Data;

import java.io.Serial;
import java.io.Serializable;

/**
 * 用户注册请求体
 *
 * @author lambor
 */
@Data
public class UserRegisterReq implements Serializable {

    @Serial
    private static final long serialVersionUID = 1L;

    /**用户名**/
    @NotBlank(message = "用户名不能为空")
    private String username;

    /**密码**/
    @NotBlank(message = "密码不能为空")
    private String password;

    /**确认密码**/
    @NotBlank(message = "确定密码不能为空")
    private String checkPassword;

    /**手机号**/
    @NotBlank(message = "手机号不能为空")
    @Pattern(regexp = "^1[3-9]\\d{9}$", message = "手机号格式不正确")
    private String phone;
}
